﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NETMovie.UI.WebMVC.Models.ViewRentalRecordModel>" %>

<tr style="width:100%;">
    <td>
        <% if (ViewData["Mode"] != null && ViewData["Mode"].ToString().Contains("D"))
           { %>
            <%: Html.ActionLink("Delete", "DeleteRental", "Rental", new { id = Model.MovieRentalID }, new { @style = "font-family:Courier New;" })%>
        <% }
           
           if (ViewData["Mode"] != null && ViewData["Mode"].ToString().Contains("R"))
           { %>
            <%: Html.ActionLink("Return", "ReturnMovie", "Rental", new { id = Model.MovieRentalID }, new { @style = "font-family:Courier New;" }) %>
        <% }
           
           if (ViewData["Mode"] != null && ViewData["Mode"].ToString().Contains("W"))
           { %>
            <%: Html.ActionLink("Watch", "WatchMovie", "Rental", new { id = Model.MovieRentalID }, new { @style = "font-family:Courier New;" })%>
        <% } %>
    </td>
    <td <% if (Model.IsPremium) { %> style="font-weight:bold;" <% } %>>
        <%: Html.DisplayFor(m => m.MovieName)%>
    </td>
    <td>
        <%: Html.DisplayFor(m => m.DueDate, "Date") %>
    </td>
    <td style="font-family:courier new, Verdana;text-align:right;padding-right:5px;">
        <%: Html.DisplayFor(m => m.Price, "Currency") %>
    </td>
</tr>